#include "Cubo3D.h"

Cubo3D::Cubo3D(PD3DEngine * e)
{
	engine = e;

	vertex1[0] = 250.0f;
	vertex1[1] = - 250.0f;
	vertex1[2] = 250.0f;
	vertex1[3] = 1.0f;

	vertex2[0] = 250.0f;
	vertex2[1] = 250.0f;
	vertex2[2] = 250.0f;
	vertex2[3] = 1.0f;

	vertex3[0] = - 250.0f;
	vertex3[1] = 250.0f;
	vertex3[2] = 250.0f;
	vertex3[3] = 1.0f;

	vertex4[0] = 250.0f;
	vertex4[1] = - 250.0f;
	vertex4[2] = 250.0f;
	vertex4[3] = 1.0f;

	vertex5[0] = - 250.0f;
	vertex5[1] = 250.0f;
	vertex5[2] = 250.0f;
	vertex5[3] = 1.0f;

	vertex6[0] = - 250.0f;
	vertex6[1] = - 250.0f;
	vertex6[2] = 250.0f;
	vertex6[3] = 1.0f;

	vertex7[0] = 250.0f;
	vertex7[1] = - 250.0f;
	vertex7[2] = - 250.0f;
	vertex7[3] = 1.0f;

	vertex8[0] = 250.0f;
	vertex8[1] = 250.0f;
	vertex8[2] = - 250.0f;
	vertex8[3] = 1.0f;

	vertex9[0] = - 250.0f;
	vertex9[1] = 250.0f;
	vertex9[2] = - 250.0f;
	vertex9[3] = 1.0f;

	vertex10[0] = 250.0f;
	vertex10[1] = - 250.0f;
	vertex10[2] = - 250.0f;
	vertex10[3] = 1.0f;

	vertex11[0] = - 250.0f;
	vertex11[1] = - 250.0f;
	vertex11[2] = - 250.0f;
	vertex11[3] = 1.0f;

	vertex12[0] = - 250.0f;
	vertex12[1] = - 250.0f;
	vertex12[2] = - 250.0f;
	vertex12[3] = 1.0f;

	vertex13[0] = 250.0f;
	vertex13[1] = - 250.0f;
	vertex13[2] = 250.0f;
	vertex13[3] =  1.0f;
	
	vertex14[0] = 250.0f;
	vertex14[1] = - 250.0f;
	vertex14[2] = - 250.0f;
	vertex14[3] = 1.0f;
	
	vertex15[0] = 250.0f;
	vertex15[1] = 250.0f;
	vertex15[2] = - 250.0f;
	vertex15[3] = 1.0f;
	
	vertex16[0] = 250.0f;
	vertex16[1] = 250.0f;
	vertex16[2] = - 250.0f;
	vertex16[3] = 1.0f;
	
	vertex17[0] = 250.0f;
	vertex17[1] = 250.0f;
	vertex17[2] = 250.0f;
	vertex17[3] = 1.0f;
	
	vertex18[0] = 250.0f;
	vertex18[1] = - 250.0f;
	vertex18[2] = 250.0f;
	vertex18[3] = 1.0f;
	
	vertex19[0] = - 250.0f;
	vertex19[1] = - 250.0f;
	vertex19[2] = 250.0f;
	vertex19[3] = 1.0f;
	
	vertex20[0] = - 250.0f;
	vertex20[1] = - 250.0f;
	vertex20[2] = - 250.0f;
	vertex20[3] = 1.0f;
	
	vertex21[0] = - 250.0f;
	vertex21[1] = 250.0f;
	vertex21[2] = - 250.0f;
	vertex21[3] = 1.0f;
	
	vertex22[0] = - 250.0f;
	vertex22[1] = 250.0f;
	vertex22[2] = - 250.0f;
	vertex22[3] = 1.0f;
	
	vertex23[0] = - 250.0f;
	vertex23[1] =  250.0f;
	vertex23[2] = 250.0f;
	vertex23[3] = 1.0f;
	
	vertex24[0] = - 250.0f;
	vertex24[1] = - 250.0f;
	vertex24[2] = 250.0f;
	vertex24[3] = 1.0f;
	
	vertex25[0] = 250.0f;
	vertex25[1] = 250.0f;
	vertex25[2] = - 250.0f;
	vertex25[3] = 1.0f;
	
	vertex26[0] = - 250.0f;
	vertex26[1] = 250.0f;
	vertex26[2] = 250.0f;
	vertex26[3] = 1.0f;
	
	vertex27[0] = 250.0f;
	vertex27[1] = 250.0f;
	vertex27[2] = 250.0f;
	vertex27[3] = 1.0f;
	
	vertex28[0] = - 250.0f;
	vertex28[1] = 250.0f;
	vertex28[2] = 250.0f;
	vertex28[3] = 1.0f;
	
	vertex29[0] = 250.0f;
	vertex29[1] = 250.0f;
	vertex29[2] = - 250.0f;
	vertex29[3] = 1.0f;
	
	vertex30[0] = - 250.0f;
	vertex30[1] = 250.0f;
	vertex30[2] = - 250.0f;
	vertex30[3] = 1.0f;

	vertex31[0] = 250.0f;
	vertex31[1] = - 250.0f;
	vertex31[2] = - 250.0f;
	vertex31[3] = 1.0f;
	
	vertex32[0] = - 250.0f;
	vertex32[1] = - 250.0f;
	vertex32[2] = 250.0f;
	vertex32[3] = 1.0f;
	
	vertex33[0] = 250.0f;
	vertex33[1] = - 250.0f;
	vertex33[2] = 250.0f;
	vertex33[3] = 1.0f;
	
	vertex34[0] = - 250.0f;
	vertex34[1] = - 250.0f;
	vertex34[2] = 250.0f;
	vertex34[3] = 1.0f;
	
	vertex35[0] = 250.0f;
	vertex35[1] = - 250.0f;
	vertex35[2] = - 250.0f;
	vertex35[3] = 1.0f;
	
	vertex36[0] = - 250.0f;
	vertex36[1] = - 250.0f;
	vertex36[2] = - 250.0f;
	vertex36[3] = 1.0f;
}

void Cubo3D::printCubo()
{

	engine->draw3DTriangle(vertex1, vertex2, vertex3, WHITE);
	engine->draw3DTriangle(vertex4, vertex5, vertex6, WHITE);

	engine->draw3DTriangle(vertex7, vertex8, vertex9, WHITE);
	engine->draw3DTriangle(vertex10, vertex11, vertex12, WHITE);

	engine->draw3DTriangle(vertex13, vertex14, vertex15, WHITE);
	engine->draw3DTriangle(vertex16, vertex17, vertex18, WHITE);

	engine->draw3DTriangle(vertex19, vertex20, vertex21, WHITE);
	engine->draw3DTriangle(vertex22, vertex23, vertex24, WHITE);

	engine->draw3DTriangle(vertex25, vertex26, vertex27, WHITE);
	engine->draw3DTriangle(vertex28, vertex29, vertex30, WHITE);

	engine->draw3DTriangle(vertex31, vertex32, vertex33, WHITE);
	engine->draw3DTriangle(vertex34, vertex35, vertex36, WHITE);
}

Cubo3D::~Cubo3D()
{
}
